home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 November / Cd users extra 14.iso / prog / inst / password / stop.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-08-14  |  6.5 KB  |  210 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    ClientHeight    =   5940
  5.    ClientLeft      =   1395
  6.    ClientTop       =   1350
  7.    ClientWidth     =   6690
  8.    ClipControls    =   0   'False
  9.    ControlBox      =   0   'False
  10.    Height          =   6345
  11.    Icon            =   "stop.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    Left            =   1335
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    NegotiateMenus  =   0   'False
  18.    ScaleHeight     =   5940
  19.    ScaleWidth      =   6690
  20.    Top             =   1005
  21.    Width           =   6810
  22.    WindowState     =   2  'Maximized
  23.    Begin VB.CommandButton Command1 
  24.       Caption         =   "Close Programm"
  25.       Enabled         =   0   'False
  26.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  27.          Name            =   "MS Sans Serif"
  28.          Size            =   13.5
  29.          Charset         =   0
  30.          Weight          =   400
  31.          Underline       =   0   'False
  32.          Italic          =   0   'False
  33.          Strikethrough   =   0   'False
  34.       EndProperty
  35.       Height          =   855
  36.       Left            =   630
  37.       TabIndex        =   5
  38.       Top             =   5985
  39.       Width           =   2430
  40.    End
  41.    Begin VB.Timer Timer2 
  42.       Enabled         =   0   'False
  43.       Interval        =   1000
  44.       Left            =   3045
  45.       Top             =   1155
  46.    End
  47.    Begin VB.TextBox Text1 
  48.       Enabled         =   0   'False
  49.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  50.          Name            =   "MS Sans Serif"
  51.          Size            =   24
  52.          Charset         =   0
  53.          Weight          =   400
  54.          Underline       =   0   'False
  55.          Italic          =   0   'False
  56.          Strikethrough   =   0   'False
  57.       EndProperty
  58.       Height          =   675
  59.       Left            =   5670
  60.       PasswordChar    =   "*"
  61.       TabIndex        =   1
  62.       Top             =   3675
  63.       Width           =   2220
  64.    End
  65.    Begin VB.Timer Timer1 
  66.       Interval        =   10
  67.       Left            =   2625
  68.       Top             =   1155
  69.    End
  70.    Begin VB.Label Label5 
  71.       Caption         =   "Password is : mouse"
  72.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  73.          Name            =   "MS Sans Serif"
  74.          Size            =   18
  75.          Charset         =   0
  76.          Weight          =   400
  77.          Underline       =   0   'False
  78.          Italic          =   0   'False
  79.          Strikethrough   =   0   'False
  80.       EndProperty
  81.       ForeColor       =   &H000000FF&
  82.       Height          =   855
  83.       Left            =   8400
  84.       TabIndex        =   6
  85.       Top             =   6300
  86.       Width           =   2745
  87.    End
  88.    Begin VB.Label Label4 
  89.       Caption         =   "Push ENTER to type a password."
  90.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  91.          Name            =   "MS Sans Serif"
  92.          Size            =   13.5
  93.          Charset         =   0
  94.          Weight          =   400
  95.          Underline       =   0   'False
  96.          Italic          =   0   'False
  97.          Strikethrough   =   0   'False
  98.       EndProperty
  99.       Height          =   435
  100.       Left            =   0
  101.       TabIndex        =   4
  102.       Top             =   1785
  103.       Width           =   5055
  104.    End
  105.    Begin VB.Label Label3 
  106.       Alignment       =   2  'Center
  107.       Caption         =   "System Control"
  108.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  109.          Name            =   "MS Sans Serif"
  110.          Size            =   24
  111.          Charset         =   0
  112.          Weight          =   400
  113.          Underline       =   0   'False
  114.          Italic          =   0   'False
  115.          Strikethrough   =   0   'False
  116.       EndProperty
  117.       Height          =   750
  118.       Left            =   105
  119.       TabIndex        =   3
  120.       Top             =   105
  121.       Width           =   6525
  122.    End
  123.    Begin VB.Label Label2 
  124.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  125.          Name            =   "MS Sans Serif"
  126.          Size            =   13.5
  127.          Charset         =   0
  128.          Weight          =   400
  129.          Underline       =   0   'False
  130.          Italic          =   0   'False
  131.          Strikethrough   =   0   'False
  132.       EndProperty
  133.       Height          =   645
  134.       Left            =   0
  135.       TabIndex        =   2
  136.       Top             =   2310
  137.       Width           =   4950
  138.    End
  139.    Begin VB.Label Label1 
  140.       Caption         =   "Password:"
  141.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  142.          Name            =   "MS Sans Serif"
  143.          Size            =   24
  144.          Charset         =   0
  145.          Weight          =   400
  146.          Underline       =   0   'False
  147.          Italic          =   0   'False
  148.          Strikethrough   =   0   'False
  149.       EndProperty
  150.       Height          =   645
  151.       Left            =   2940
  152.       TabIndex        =   0
  153.       Top             =   3675
  154.       Width           =   2220
  155.    End
  156. Attribute VB_Name = "Form1"
  157. Attribute VB_Creatable = False
  158. Attribute VB_Exposed = False
  159. Option Explicit
  160.     Dim ter As Boolean
  161. Private Sub Command1_Click()
  162.     ter = False
  163.     DisableCtrlAltDelete (False)
  164.     Unload Form1
  165. End Sub
  166. Private Sub Form_KeyPress(KeyAscii As Integer)
  167.     If KeyAscii = 13 Then
  168.         Timer1.Enabled = False
  169.         Timer2.Enabled = True
  170.         Text1.Enabled = True
  171.     End If
  172. End Sub
  173. Private Sub Form_Load()
  174.     DisableCtrlAltDelete (True)
  175.     ter = True
  176. End Sub
  177. Private Sub Form_LostFocus()
  178.     Form1.SetFocus
  179. End Sub
  180. Private Sub Form_Unload(Cancel As Integer)
  181.     If ter = True Then
  182.         Cancel = 5
  183.     Else
  184.     End If
  185. End Sub
  186. Private Sub Timer1_Timer()
  187.     Form1.SetFocus
  188.     Label2.Caption = 5
  189. End Sub
  190. Private Sub Timer2_Timer()
  191.     Label2.Caption = Val(Label2.Caption) - 1 & "  Seconds time to write a password."
  192.     Text1.SetFocus
  193.     If Text1.Text = "mouse" Then
  194.         ter = False
  195.         Timer2.Enabled = False
  196.         Timer1.Enabled = False
  197.         Label2.Caption = "5"
  198.         MsgBox "Password accepted, you can close this programm now."
  199.         Text1.Enabled = False
  200.         Command1.Enabled = True
  201.     End If
  202.     If Val(Label2.Caption) = 0 Then
  203.         Timer1.Enabled = True
  204.         Timer2.Enabled = False
  205.         Text1.Text = ""
  206.         Text1.Enabled = False
  207.         Command1.Enabled = False
  208.     End If
  209. End Sub
  210.